/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.delaphone.flocash.web.action;

import com.delaphone.flocash.service.BankService;
import com.opensymphony.xwork2.Action;
import org.hibernate.HibernateException;

/**
 *
 * @author tamdx
 */
public class ActiveBankAction extends BaseAction {

    private BankService bankService;
    private int id;

    @Override
    public String execute() {
        id = Integer.valueOf(request.getParameter("id"));
        try {
            bankService.activeBank(id);
        } catch (HibernateException hibernateException) {
            logger.error("Active Bank Error");
            return Action.ERROR;
        }
        return Action.SUCCESS;
    }

    public BankService getBankService() {
        return bankService;
    }

    public void setBankService(BankService bankService) {
        this.bankService = bankService;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }
}
